﻿// Apache-2.0 License
// Copyright (c) 2021-2022 donghongpeng
// 电话/微信：17629231227

using Furion.Schedule;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Cherry.Core;

/// <summary>
/// 清理日志作业任务
/// </summary>
[JobDetail("job_log", Description = "清理操作日志", GroupName = "default", Concurrent = false)]
[Daily(TriggerId = "trigger_log", Description = "清理操作日志")]
public class LogJob : IJob
{
    private readonly IServiceProvider _serviceProvider;

    public LogJob(IServiceProvider serviceProvider)
    {
        _serviceProvider = serviceProvider;
    }

    public async Task ExecuteAsync(JobExecutingContext context, CancellationToken stoppingToken)
    {
        Console.Write($"开始执行...{DateTime.Now}");
        await Task.CompletedTask;
    }
}